﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.YiDongYuan
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2021-06-09 22:45
    /// 描 述：尾气检测结果实体类
    /// </summary>
    [Table("detectionresult")]
    public class DetectionResultEntity : BaseEntity
    {
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string VIN { get; set; }

        /// <summary>
        /// 车辆号牌
        /// </summary>
        /// <returns></returns>
        public string carbrand { get; set; }

        /// <summary>
        /// 燃油类型
        /// </summary>
        /// <returns></returns>
        public string fueltype { get; set; }

        /// <summary>
        /// 测试方法 0-自由加速，1-自由加载，2-双怠速，3-遥感
        /// </summary>
        /// <returns></returns>
        public string testmethod { get; set; }

        /// <summary>
        /// 测试时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? testingtime { get; set; }

        /// <summary>
        /// 额定功率
        /// </summary>
        /// <returns></returns>
        public string mechpower { get; set; }

        /// <summary>
        ///  ECU 诊断 0-合格，1-不合格
        /// </summary>
        /// <returns></returns>
        public string DTC { get; set; }

        /// <summary>
        /// 机油温度/发动机温
        /// </summary>
        /// <returns></returns>
        public string OilTemp { get; set; }

        /// <summary>
        ///  检测结果 0-合格，1-不合格
        /// </summary>
        /// <returns></returns>
        public string testresult { get; set; }

        /// <summary>
        ///  设备 ID
        /// </summary>
        /// <returns></returns>
        public string DeviceID { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        /// <returns></returns>
        public string Longitude { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        /// <returns></returns>
        public string Latitude { get; set; }

        /// <summary>
        /// 海拔
        /// </summary>
        /// <returns></returns>
        public string Altitude { get; set; }

        /// <summary>
        /// 温度
        /// </summary>
        public string Tmp { get; set; }

        /// <summary>
        /// 湿度
        /// </summary>
        public string Hum { get; set; }

        /// <summary>
        /// 大气压强
        /// </summary>
        public string Pres { get; set; }

        /// <summary>
        /// K1 值
        /// </summary>
        /// <returns></returns>
        public double k1 { get; set; }

        /// <summary>
        ///  K1 对应转速
        /// </summary>
        /// <returns></returns>
        public string Rpm1 { get; set; }

        /// <summary>
        /// K2 值
        /// </summary>
        /// <returns></returns>
        public double k2 { get; set; }

        /// <summary>
        ///  k2 对应转速
        /// </summary>
        /// <returns></returns>
        public string Rpm2 { get; set; }

        /// <summary>
        /// K3 值
        /// </summary>
        /// <returns></returns>
        public double k3 { get; set; }

        /// <summary>
        /// k3 对应转速
        /// </summary>
        /// <returns></returns>
        public string Rpm3 { get; set; }

        /// <summary>
        /// 自由加速限值
        /// </summary>
        /// <returns></returns>
        public double acclimits { get; set; }

        /// <summary>
        /// 自由加速平均值
        /// </summary>
        /// <returns></returns>
        public double accavg { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? createTime { get; set; }

        /// <summary>
        /// 自由加速最大值
        /// </summary>
        /// <returns></returns>
        public double accmax { get; set; }

        /// <summary>
        /// 自由加速超标值
        /// </summary>
        /// <returns></returns>
        public double accdiff { get; set; }

        /// <summary>
        /// 过程数据
        /// </summary>
        [NotMapped]
        public string Data { get; set; }
    }
}
